(function($){
    if (window.Grid == undefined) {
        window.Grid = {
            checkedCustomer: []
        };
    }
    var Grid = window.Grid;
    /*
     查找是否存在ID
     */
    Grid.findCheckedCustomer = function(id){
        for (var i = 0; i < Grid.checkedCustomer.length; i++) {
            if (Grid.checkedCustomer[i] == id) 
                return i;
        }
        return -1;
    }
    /*
     增加ID
     */
    Grid.addCheckedCustomer = function(id){
        if (Grid.findCheckedCustomer(id) == -1) 
            Grid.checkedCustomer.push(id);
    }
    /*
     删除ID
     */
    Grid.removeCheckedCustomer = function(id){
        var i = Grid.findCheckedCustomer(id);
        if (i == -1) 
            return;
        Grid.checkedCustomer.splice(i, 1);
    }
    
    
})(jQuery);





